//
//  dingdanViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/11/28.
//  Copyright (c) 2015年 com.ppfur. All rights reserved.
//

#import "dingdanViewController.h"

@interface dingdanViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
}

@end

@implementation dingdanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 114*aa, width, height-120);
    NSLog(@"%f",height);
//    _mytable.scrollEnabled=YES;
     _mytable.showsVerticalScrollIndicator = YES;
    // Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 4;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 150;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 5;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
//    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 10, 200, 20)];
    ll1.text=@"订单号:26746531852162";
    ll1.textColor=[UIColor redColor];
    ll1.font=[UIFont systemFontOfSize:13.0f];
    [cell.contentView addSubview:ll1];
    UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(270, 10, 100, 20)];
    ll2.text=@"待付款";
    ll2.textColor=[UIColor redColor];
    ll2.font=[UIFont systemFontOfSize:12.0f];
    [cell.contentView addSubview:ll2];
    UIView*vvv1=[[UIView alloc] initWithFrame:CGRectMake(0, 35, 320, 1)];
    vvv1.backgroundColor=[UIColor groupTableViewBackgroundColor];
    [cell.contentView addSubview:vvv1];
    UIImageView*ii1=[[UIImageView alloc] initWithFrame:CGRectMake(30, 40, 90, 90)];
    ii1.image = [UIImage imageNamed:@"dd2.jpg"];
    [cell.contentView addSubview:ii1];
    return cell;
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
